import React from 'react';

const ChildComponent = (props) => {
    //  props 中是从父组件传递过来的参数
  return (
    <div>
      <h2>子组件</h2>
      <p>姓名: {props.name}</p>
      <p>年龄: {props.age}</p>
    </div>
  );
};

export default ChildComponent;
